<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="superviseMenu" />
<meta name="nav" content="2" />
<meta name="acc" content="0" />
<title>工地试验室授权备案登记表</title>
<script type="text/javascript">
	var i = 1;
	function addFile(divName, fileName) {
		var dv = document.getElementById(divName);

		var file = document.createElement("input");
		file.type = "file";
		file.name = fileName;
		file.id = fileName + i;
		dv.appendChild(file);

		var btn = document.createElement("input");
		btn.type = "button";
		btn.id = btn.name = "btn" + i;
		btn.value = "删除";

		btn.onclick = function() {
			var b = document.getElementById(btn.id);
			dv.removeChild(b.nextSibling);
			dv.removeChild(b.previousSibling);
			dv.removeChild(b);
		}
		dv.appendChild(btn);
		dv.appendChild(document.createElement("BR"));

		i++;
	}
</script>
</head>
<body>
	<form action="${ctx }/business/labs/petition!save.action" method="post"
		class="yform" id="inputForm" enctype="multipart/form-data">
		<div id="caption">
			<h6>工地试验室授权备案登记表</h6>
		</div>
		<input type="hidden" name="id" id="id" value="${id }"> <input
			type="hidden" name="fid" id="fid" value="${flowRecheck.id }"><input
			type="hidden" name="projectId" id="projectId" value="${projectId }">
		<div>
			<table>
				<tr class="type-text">
					<td>项目名称</td>
					<td><pt:labels type="proj" argument1="${projectId }"
							single="true"></pt:labels></td>
				</tr>
				<tr class="type-text">
					<td>实验室名称</td>
					<td>${labsName }</td>
				</tr>
				<tr class="type-text">
					<td>申请内容</td>
					<td>${content }</td>
				</tr>
				<tr class="type-text">
					<td>申请单位</td>
					<td>${orgName }</td>
				</tr>
				<tr class="type-text">
					<td>联系人</td>
					<td>${contact}</td>
				</tr>
				<tr class="type-text">
					<td>联系电话</td>
					<td>${phone }</td>
				</tr>
				<tr class="type-text">
					<td>电子邮箱</td>
					<td>${email }</td>
				</tr>
				<tr class="type-text">
					<td>备注</td>
					<td>${remark }</td>
				</tr>
			</table>
			<c:if test="${not empty attachments }">
				<div id="caption">
					<h6>${licenseplateNumber}已有附件</h6>
				</div>
				<table>
					<c:forEach items="${attachments }" var="attachment"
						varStatus="state">
						<tr id="tr${state.index }">
							<td colspan="4"><a title="下载"
								href="${ctx}/servlet/annex?id=${attachment.id}">${attachment.upfileFileName}(${attachment.type})<fmt:formatDate
										value="${attachment.fileTime}" pattern="yyyy-MM-dd HH:mm" />
							</a></td>
						</tr>
					</c:forEach>
				</table>
			</c:if>
		</div>
		<div class="type-button">
			<input type="button" class="button" value="关闭" onclick="window.parent.close()">
			<input type="button" value="返回" class="reset"
				onclick="history.back()" />
		</div>
	</form>
</body>
</html>